<?php

namespace app\admin\model\finance\extract;

use think\Model;

class Info extends Model
{
    // 表名
    protected $name = 'finance_extract_info';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    
    // 追加属性
    protected $append = [
        'idnumber_text',
		'cardnumber_text',
		'username_text',
		'mobile_text'
    ];
    
	 public function getIdnumberTextAttr($value, $data){   
        $value = $value ? $value : $data['userid'];
		return TableField('Admin','id_number',$value,'userid');
    }
	 public function getCardnumberTextAttr($value, $data){   
        $value = $value ? $value : $data['userid'];
		return TableField('Admin','card_number',$value,'userid');
    }
	 public function getMobileTextAttr($value, $data){   
        $value = $value ? $value : $data['userid'];
		return TableField('Admin','card_number',$value,'userid');
    }
	 public function getUsernameTextAttr($value, $data){   
        $value = $value ? $value : $data['userid'];
		return TableField('Admin','username',$value,'userid');
    }




}
